<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once('php/MyDB.php');
require_once('php/WallSocket.php');
require_once('php/login.php');

$db = new MyDB();
$level = $_GET['level'];
switch($level){
    case 0:
        $rackList = $db->selectRack($_GET['floor']);
    echo json_encode($rackList);
    break;

case 1:
        $ppList = $db->selectPP($_GET['floor'],$_GET['rack']);
   echo json_encode($ppList);
   break;

case 2:
      
        $socketsDialog = $db->selectSockets($_GET['floor'], $_GET['rack'], $_GET['patchPanel']);
   
    echo json_encode($socketsDialog);
    break;

default:
echo "no case";       
    
}

$db->disconnect();

?>
